import request from '@/utils/request'

// 添加笔记分类
export function addNoteCategory(data) {
  return request({
    url: '/note/category/add',
    method: 'post',
    data
  })
}

// 修改笔记分类
export function updateNoteCategory(data) {
  return request({
    url: '/note/category/update',
    method: 'post',
    data
  })
}

// 删除笔记分类
export function deleteNoteCategory(id) {
  return request({
    url: '/note/category/delete',
    method: 'post',
    params: {
      id
    }
  })
}

// 获取笔记分类详情
export function getNoteCategoryDetail(id) {
  return request({
    url: '/note/category/detail',
    method: 'get',
    params: {
      id
    }
  })
}

// 获取用户的所有笔记分类
export function getNoteCategoryList() {
  return request({
    url: '/note/category/list',
    method: 'get'
  })
}

// 分页查询笔记分类
export function getNoteCategoryPage(params) {
  return request({
    url: '/note/category/page',
    method: 'get',
    params
  })
} 